package com.study.demoevent.controller;

import com.study.demoevent.event.publisher.PublisherService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name: MyController
 * @Description: java类作用描述
 * @Author: yn
 * @CreateDate: 2022/9/5 16:57
 * @Remark: 特殊说明
 * @Version: 1.0
 */
@RestController
@AllArgsConstructor
public class MyController {

	private final PublisherService publisherService;
	@GetMapping("/get")
	public String get(String name){
		publisherService.publishEvent(name);
		return "已发送";
	}
}
